

IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].GetDeliverableStatusesForProgressMaster') AND type in (N'P', N'PC'))
DROP PROCEDURE [dbo].GetDeliverableStatusesForProgressMaster 
GO
-- =======================================================================  
-- =======================================================================    
-- Procedure Name: dbo.GetDeliverableStatusesForProgressMaster    
--    
-- Author:      Ponraja Chandran  
--    
-- Create date: 11/18/09    
--    
-- Description: Returns list of Deliverable Statuses for Finance Reports    
--    
-- Parameters:  None    
--                  
-- Returns:     INT, 0=Success, -1=Error    
--    
-- SampleCall:    
-- EXECUTE dbo.GetDeliverableStatusesForProgressMaster()    
--    
--------------------------------------------------------------------------    
-- Date        Initials  Modification    
--------------------------------------------------------------------------    
-- 03/12/09    RM   Created based on the GetDeliverableStatusesForProgress stored    
--    
-- =======================================================================    
    
CREATE PROCEDURE [dbo].GetDeliverableStatusesForProgressMaster    
AS    
BEGIN    
     /*  Returned Fields for Dropdown    
     --------------------------------    
     DELSTAT             VARCHAR                 
     DELSTATID           VARCHAR    
     */    
    
     -- Initial Settings    
     SET NOCOUNT ON    
         
     -- Declare Local Variables    
     DECLARE   @Error            INT,    
               @RowCount         INT    
    
     -- Result Query        
     SELECT 'ALL'   AS DELSTAT,    
               0    AS DELSTATID,    
            'All' AS DELSTATDESC    
     UNION    
     SELECT 'Progress Report - Awaiting Departmental Paperwork',    
               1,    
            'Progress Report - Awaiting Departmental Paperwork'    
     UNION  
     SELECT 'Progress Report - Pending Out Years',    
               2,    
            'Progress Report - Pending Out Years'                
     ORDER BY DELSTATID                  
    
     SELECT @Error=@@ERROR,@RowCount=@@ROWCOUNT    
     IF @Error!=0    
          RETURN -1    
    
     -- Return Success    
     RETURN 0         
END    
GO

GRANT EXECUTE ON dbo.GetDeliverableStatusesForProgressMaster TO InsightReport,Insight
GO


